package com.rustic.server.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.rustic.server.dto.base.TravelPlanBaseDTO;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

/**
 * 表[travel_plan]对应UpdateDTO类
 *
 * @author auto
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class TravelPlanUpdateDTO extends TravelPlanBaseDTO {
    /**
     * 自增ID
     */
    @NotNull(message = "id不能为空")
    @Min(value = 1, message = "id不能为空")
    @ApiModelProperty(value = "自增ID", dataType = "Integer")
    private Integer id;

    /**
     * 关联乡村id
     */
    @NotNull(message = "关联乡村不能为空")
    @Min(value = 1, message = "关联乡村不能为空")
    @ApiModelProperty(value = "关联乡村id", dataType = "int")
    private int rusticId;

    /**
     * 攻略名称
     */
    @NotEmpty(message = "攻略名称不能为空")
    @Length(min = 0, max = 100, message = "攻略名称长度为0-100个字符")
    @ApiModelProperty(value = "攻略名称", dataType = "String")
    private String name;

    /**
     * 封面
     */
    @NotEmpty(message = "封面不能为空")
    @Length(min = 0, max = 500, message = "封面长度为0-500个字符")
    @ApiModelProperty(value = "封面", dataType = "String")
    private String cover;

    /**
     * 图片(轮播图)
     */
    @Length(min = 0, max = 500, message = "图片(轮播图)长度为0-500个字符")
    @ApiModelProperty(value = "图片(轮播图)", dataType = "String")
    private String images;

    /**
     * 介绍
     */
    @NotEmpty(message = "介绍不能为空")
    @ApiModelProperty(value = "介绍", dataType = "String")
    private String introduce;


}
